package com.zksk.mbg.admin.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zksk.common.core.web.domain.BaseEntity;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author Zksk Acmen
 * @since 2022-12-16
 */
@Data
@Accessors(chain = true)
@TableName("platform_fact_member")
@ApiModel(value = "Member对象", description = "用户信息表")
public class Member extends BaseEntity {

    @ApiModelProperty("主键id")
    @TableId(value = "member_id", type = IdType.ASSIGN_ID)
    private Long memberId;

    @ApiModelProperty("用户名称")
    @TableField("member_name")
    private String memberName;

    @ApiModelProperty("用户编码")
    @TableField("member_code")
    private String memberCode;

    @ApiModelProperty("企业类型（国企、民营...）")
    @TableField("member_type")
    private String memberType;

    @ApiModelProperty("企业等级")
    @TableField("member_level")
    private String memberLevel;

    @ApiModelProperty("营销人员，关联sys_user表user_id")
    @TableField("sale_user")
    private Long saleUser;

    @ApiModelProperty("营销人员名称，对应sys_user表nick_name")
    @TableField("sale_username")
    private String saleUsername;

    @ApiModelProperty("是否营销（0未营销 1已营销）")
    @TableField("if_sale")
    private Integer ifSale;

    @ApiModelProperty("营销分配时间")
    @TableField("plan_time")
    private LocalDateTime planTime;

    @ApiModelProperty("用户所属渠道id")
    @TableField("channel_id")
    private Long channelId;

    @ApiModelProperty("用户所属渠道名称")
    @TableField("channel_name")
    private String channelName;

    @ApiModelProperty("用户类型(0未申请用户、1已咨询用户、2已申请用户)")
    @TableField("`status`")
    private Integer status;

    @ApiModelProperty("统一社会信用代码")
    @TableField("credit_code")
    private String creditCode;

    @ApiModelProperty("详细地址")
    @TableField("address")
    private String address;

    @ApiModelProperty("联系电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("注册资本")
    @TableField("reg_money")
    private BigDecimal regMoney;

    @ApiModelProperty("行业类型（农林牧渔...）")
    @TableField("trade_type")
    private String tradeType;

    @ApiModelProperty("法人姓名")
    @TableField("legal_name")
    private String legalName;

    @ApiModelProperty("法人联系电话")
    @TableField("legal_phone")
    private String legalPhone;

    @ApiModelProperty("基本户名称")
    @TableField("bank_name")
    private String bankName;

    @ApiModelProperty("开户行")
    @TableField("open_bank")
    private String openBank;

    @ApiModelProperty("基本户账号")
    @TableField("bank_account")
    private String bankAccount;

    @ApiModelProperty("开户许可文件")
    @TableField("open_bank_file")
    private String openBankFile;

    @ApiModelProperty("营业执照")
    @TableField("bus_certificate")
    private String busCertificate;

    @ApiModelProperty("法人身份证")
    @TableField("legal_code")
    private String legalCode;

    @ApiModelProperty("用户来源所属平台ID")
    @TableField("stations_id")
    private Long stationsId;

    @ApiModelProperty("用户来源所属平台名称")
    @TableField("stations_name")
    private String stationsName;

    @ApiModelProperty("用户入库时间")
    @TableField("storage_time")
    private LocalDateTime storageTime;

    @ApiModelProperty("删除标识（0 正常 2 删除）")
    @TableField(value = "del_flag", fill = FieldFill.INSERT)
    @TableLogic
    private Integer delFlag;


    public static final String MEMBER_ID = "member_id";

    public static final String MEMBER_NAME = "member_name";

    public static final String MEMBER_CODE = "member_code";

    public static final String MEMBER_TYPE = "member_type";

    public static final String MEMBER_LEVEL = "member_level";

    public static final String SALE_USER = "sale_user";

    public static final String SALE_USERNAME = "sale_username";
    public static final String IF_SALE = "if_sale";

    public static final String PLAN_TIME = "plan_time";

    public static final String CHANNEL_ID = "channel_id";

    public static final String CHANNEL_NAME = "channel_name";

    public static final String STATUS = "status";

    public static final String CREDIT_CODE = "credit_code";

    public static final String ADDRESS = "address";

    public static final String PHONE = "phone";

    public static final String REG_MONEY = "reg_money";

    public static final String TRADE_TYPE = "trade_type";

    public static final String LEGAL_NAME = "legal_name";

    public static final String LEGAL_PHONE = "legal_phone";

    public static final String BANK_NAME = "bank_name";

    public static final String OPEN_BANK = "open_bank";

    public static final String BANK_ACCOUNT = "bank_account";

    public static final String OPEN_BANK_FILE = "open_bank_file";

    public static final String BUS_CERTIFICATE = "bus_certificate";

    public static final String LEGAL_CODE = "legal_code";

    public static final String STATIONS_ID = "stations_id";

    public static final String STATIONS_NAME = "stations_name";

    public static final String ENQUIRE_ID = "enquire_id";

    public static final String ENQUIRE_NAME = "enquire_name";

    public static final String PURPOSE = "purpose";

    public static final String STORAGE_TIME = "storage_time";

    public static final String DEL_FLAG = "del_flag";

    @Override
    public Serializable pkVal() {
        return this.memberId;
    }

}
